<template>
  <div>
    <h1>
      {{message}}
    </h1>
    <div>
      <button @click="change_mess">改变</button>
    </div>
  </div>
</template>

<script>
export default {
  name: "sayHello",
  data(){
    return{
      message:'おはようございます！ VUE3'
    }
  },
  methods:{
    change_mess(){
      this.message='晚上好，打工人！';
      alert(this.$store.state.mess);
    }
  }

}
</script>

<style scoped>

</style>